

from rest_framework.viewsets import ModelViewSet
from meiduo_admin.serializers.admin_serializers import *
from meiduo_admin.utils.pages import MyPage

class AdminModelViewSet(ModelViewSet):
    queryset = User.objects.all()
    serializer_class = AdminModelSerializer
    pagination_class = MyPage


    def get_queryset(self):
        return self.queryset.filter(is_staff=True)